package com.dongdongshop.api;

import com.dongdongshop.data.Result;
import com.dongdongshop.dto.ItemDto;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;


@FeignClient("dongdongshop-goods-service")
public interface GoodsServiceApi {
    @GetMapping("/goods/getItem")
    Result<ItemDto> getItem(@RequestParam Long itemId);

    //扣减库存
    @PostMapping("/itemCat/subStockCount")
    Result subStockCount(@RequestBody List<ItemDto> itemVoList);
}
